package com.lixl;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.lixl.demo01interface.UserService;

public class Customer {

	public static void main(String[] args) throws InterruptedException {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
				new String[] { "classpath*:customer.xml" });

		context.start();

		UserService userService = context.getBean("userServiceImpl",
				UserService.class);

		for (int i = 0; i < 10; i++) {
			Thread.sleep(10000);
			System.out.println(userService.getUserName("123"));
		}

		context.close();
	}

}
